package com.todod.base.module.base.dal.mysql.datadistribute;

import java.util.*;

import com.todod.base.framework.common.pojo.PageResult;
import com.todod.base.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.todod.base.framework.mybatis.core.mapper.BaseMapperX;
import com.todod.base.module.base.dal.dataobject.datadistribute.DataDistributeDO;
import org.apache.ibatis.annotations.Mapper;
import com.todod.base.module.base.controller.admin.datadistribute.vo.*;

/**
 * 数据分发设置 Mapper
 *
 * @author 超管儿
 */
@Mapper
public interface DataDistributeMapper extends BaseMapperX<DataDistributeDO> {

    default PageResult<DataDistributeDO> selectPage(DataDistributePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<DataDistributeDO>()
                .betweenIfPresent(DataDistributeDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(DataDistributeDO::getId));
    }

}